from ctypes import HRESULT

str1 = "1234567890"
print(str1[1::2])

str2 = '13546789745678'
new_str2= '+' + str2[1:-1] + '+'

# 输出结果
print(new_str2)

# str3 ="abc123"
# result = str3[2] + str3 [3]
# print(result)

str3 = 'abc123'
x = len(str3)
if x % 2 == 0:
    print('该字符的中间元素为：',str3[x // 2 - 1 ],str3[x // 2])
else:
    print('该字符的中间元素为：',str3[x // 2])

str4 = 'hello world'
def y(string):
    if len(string) == 0:
        return string
    else:
        return string[0].upper() + string[1:]
print(y(str4))


